<div ng-init="query_event.init();" class="kmi-layout-content QT06-query-page">
    <div class="kmi-header-row">
        <button class="back-btn" ng-click="query_event.back();" ng-if="fromMainEvent">
            <img src='image/smes_v340/W_Com_DropLeft_nor_32.png'></img>
        </button>
        <div class="header-title" ng-bind="'QT_standard.common.filterCondition.title' | translate"></div>
    </div>
    <div class="kmi-layout-main-content">
        <div class="kmi-layout-page">
            <div class="first-level-fields">
                <div class="kmi-text-fields">
                    <label for="select-level" ng-bind="'QT06.query_page.select_level' | translate"></label>
                    <div class="input-wrapper" id="select-level">
                        <input ng-click="query_event.loadLevelList(query_event.select_level_item)" ng-model="query_event.select_level_item.label" class="column_name ng-pristine ng-valid ng-not-empty ng-touched" type="text" readonly="readonly">
                        <div class="tip"><i class="material-icons">&#xE5CF;</i></div>
                    </div> 
                </div>
            </div>
            <div class="condition-fields">
                <div class="kmi-text-fields condition-fields left">
                    <div class="input-wrapper">
                        <input ng-click="query_event.loadCodeList(query_event.select_label_item)" ng-model="query_event.select_label_item.label" class="column_name ng-pristine ng-valid ng-not-empty ng-touched" type="text" readonly="readonly">
                        <div class="tip"><i class="material-icons">&#xE5CF;</i></div>
                    </div> 
                    <div class="input-wrapper">
                        <input class="query_mode ng-pristine ng-valid ng-not-empty ng-touched" ng-click="query_event.loadTypeList(query_event.select_type_item)" ng-model="query_event.select_type_item.label" type="text" readonly="readonly">
                        <div class="tip"><i class="material-icons">&#xE5CF;</i></div>
                    </div>
                    <div class="input-wrapper">
                        <input class="column_value ng-pristine ng-valid ng-not-empty ng-touched" ng-model="query_event.select_txt_vale" type="text">
                    </div>
                    <button ng-click="query_event.addCondition()" class="mdl-button mdl-js-button mdl-button--icon mdl-button--icon_prime">
                        <img src="image/icons/add.png">
                    </button>
                </div>
                <div class="kmi-text-fields condition-fields right">
                    <div class="kmi-button">
                        <label ng-bind="'QT06.query_page.search'|translate"></label>
                        <div class="kmi-can-click" ng-click="query_event.search()"></div>
                    </div>
                    <div class="kmi-button second">
                        <label ng-bind="'QT06.query_page.clear'|translate"></label>
                        <div class="kmi-can-click" ng-click="query_event.clear()"></div>
                    </div>
                </div>
            </div>
            <div class="condition-panel" ng-if="query_event.condition.length > 0" class="kmi-text-fields" >
                <div class="condition-content perfect-scrollbar" suppress-scroll-x="false">
                    <div ng-click="query_event.removeConditionItem(condition,$index)"  ng-repeat="condition in query_event.condition track by $index" class="condition ng-scope">
                        <button class="mdl-button mdl-button--icon">
                            <i class="material-icons">&#xE5CF;</i>
                        </button>
                        <label class="ng-binding" ng-bind="condition.label_name"></label>
                        <label class="ng-binding">｜</label>
                        <label class="ng-binding" ng-bind="condition.query_name"></label>
                        <label class="ng-binding">｜</label>
                        <label class="ng-binding" ng-bind="condition.value_txt"></label>
                        <div class="kmi-can-click"></div>
                    </div>
                </div>
            </div>
            <div class="kmi-list column-selector" column-selector-id="query-page">
                <div class="kmi-list__header">
                    <div class="kmi-list__column" style="flex: 0 0 50px;"></div>
                    <div class="kmi-list__column" style="flex: 0 0 190px;" ng-bind="'QT06.query.RONO' | translate"></div>
                    <div class="kmi-list__column" style="flex: 0 0 190px;" ng-bind="'QT06.query.MONO' | translate"></div>
                    <div class="kmi-list__column" style="flex: 0 0 190px;" ng-bind="'QT06.query.LOTNO' | translate"></div>
                </div>
                <div class="kmi-list__row-content">
                    <div class="kmi-list__row"  ng-class="{'is-select':setting_item.is_select}"  ng-repeat="setting_item in query_event.getPages(query_event.query_setting_detail, query_event.PageConfig) track by $index">
                        <div class="kmi-list__column column-border">
                            <div class="div-circle"></div>
                        </div>
                        <div class="kmi-list__column column-border" ng-bind="setting_item.RONO"></div>
                        <div class="kmi-list__column column-border" ng-bind="setting_item.MONO"></div>
                        <div class="kmi-list__column column-border" ng-bind="setting_item.BASELOTNO"></div>
                        <div class="kmi-can-click" ng-click="query_event.selectItem(setting_item)"></div>
                    </div>
                </div>
                <div class="page-content">
                    <div class="page-icon">
                        <img src="image/icons/dropleft.png"></img>
                        <div class="kmi-can-click" ng-click="query_event.PageConfig.page = (query_event.PageConfig.page-1<0?0:query_event.PageConfig.page-1);"></div>
                    </div>
                    <label ng-bind="(query_event.PageConfig.page +1)+' / '+query_event.PageConfig.total_page"></label>
                    <div class="page-icon">
                        <img src="image/icons/dropright.png"></img>
                        <div class="kmi-can-click" ng-click="query_event.PageConfig.page = (query_event.PageConfig.page+1>(query_event.PageConfig.total_page-1)?(query_event.PageConfig.total_page-1):query_event.PageConfig.page+1);"></div>
                    </div>
                </div>
            </div>
            <div class="query-layout-footer">
                <div class="kmi-button confirm" ng-disabled="query_event.isConfirmBtnDisabled();">
                    <label class="ng-binding" ng-bind="'common.btn.confirm'|translate"></label>
                    <div class="kmi-can-click" ng-click="query_event.confirm()"></div>
                </div>
                <div class="kmi-button cancel">
                    <label ng-bind="'common.btn.close'|translate"></label>
                    <div class="kmi-can-click" ng-click="query_event.back()"></div>
                </div>
            </div>
        </div>
    </div>
</div>